package xinxin.com.CommandPattern;

import xinxin.com.CommandPattern.Barbecuer.Barbecuer;
import xinxin.com.CommandPattern.Command.Command;
import xinxin.com.CommandPattern.Command.Detail.BakeChickenWingCommand;
import xinxin.com.CommandPattern.Command.Detail.BakeMuttonCommand;
import xinxin.com.CommandPattern.Waiter.Waiter;

public class CommandPattern {
    public static void main(String[] args) {
        // 开店前准备
        Barbecuer boy = new Barbecuer();
        Command bakeMuttonCommand1 = new BakeMuttonCommand(boy);
        Command bakeMuttonCommand2 = new BakeMuttonCommand(boy);
        Command bakeChickenWingCommand1 = new BakeChickenWingCommand(boy);
        Waiter girl = new Waiter();

        // 开门营业
        girl.SetOrder(bakeMuttonCommand1);
        girl.SetOrder(bakeMuttonCommand2);
        girl.SetOrder(bakeChickenWingCommand1);
        girl.Notify();
    }
}
